# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hikpwn
pkgver=8.5a7d69c
pkgrel=7
pkgdesc='A simple scanner for Hikvision devices with basic vulnerability scanning capabilities written in Python 3.8.'
groups=('blackarch' 'blackarch-scanner')
arch=('any')
url='https://github.com/4n4nk3/HikPwn'
license=('GPL3')
depends=('python' 'python-scapy' 'python-lxml' 'python-requests')
makedepends=('git')
source=("$pkgname::git+https://github.com/4n4nk3/HikPwn.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname


  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

